<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
            <title>Shampoo - My Lifestyle. My Reservation.</title>
            <?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
            <link href='http://fonts.googleapis.com/css?family=Open+Sans:100,400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' />
            <!--<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />-->
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/bootstrap.min.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/bootstrap-responsive.min.css"/>
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/bootstrap-select.min.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/style.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/component.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/bootstrap-timepicker.min.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/custom.css" />
            <link rel="stylesheet" type="text/css" href="<?php echo $this->assetDir ?>css/responsive.css" />
            <?php Yii::app()->clientScript->registerCssFile($this->assetDir . 'css/jquery-ui.1.10.3.css'); ?>
            <script src="<?php echo $this->assetDir ?>js/modernizr.custom.26633.js" type="text/javascript"></script>
            
            <script src="<?php echo $this->assetDir ?>js/jquery-ui.1.10.3.js" type="text/javascript"></script>
            <script src="<?php echo $this->assetDir ?>js/bootstrap.min.js"></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.swing.js"></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.mobile.customized.min.js" type='text/javascript' ></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.easing.1.3.js" type='text/javascript' ></script> 
            <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
            <script src="<?php echo $this->assetDir ?>js/jquery.gridrotator.js" type="text/javascript"></script>
            
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/masonry.pkgd.min.js'); ?>
			<?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/imagesloaded.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/classie.js'); ?>
            <?php Yii::app()->clientScript->registerScriptFile($this->assetDir . 'js/AnimOnScroll.js'); ?>

    </head>

    <body class="home">
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>
        <style>
		.page-wrap:after{
			content: "";
			display: none;
		}
		.page-wrap:after{
			height:0px;
		}
		.page-wrap{
			margin-top:-140px;
		}
		</style>
    	<div class="page-wrap">
            <div id="loading">
                <div id="loading_content">
                    <img src="<?php echo $this->assetDir ?>img/loading.gif"/>
                    Loading ...
                </div>
            </div>
            <?php echo $content; ?>
        </div>
    </body>
    <script>
	$(function(){
		//load ajax
		$("#loading").bind("ajaxStart", function() {
			$(this).show();
		}).bind("ajaxComplete", function() {
			$(this).hide();
		});
		setTimeout(function(){
			new AnimOnScroll( document.getElementById('grid'), {
				minDuration : 0.4,
				maxDuration : 0.7,
				viewportFactor : 0.2
			} );
		},3000);
		
	});
        function favourite(el, sid)
        {
<?php if (!Yii::app()->user->isGuest): ?>
                $.post('<?php echo $this->createUrl('favourite/check'); ?>', {
                    sid: sid
                }, function(data) {
                    if (data.status == 1) {//add
                        el.find('i').removeClass('icon-heart-white').addClass('icon-heart-pink');
                    }
                    else {//remove
                        el.find('i').removeClass('icon-heart-pink').addClass('icon-heart-white');
                    }
                }, 'json');
<?php else: ?>
                alert('Please login or signup to add to My Favourites');
<?php endif; ?>
        }
    </script>
</html>
